import request from '@/utils/request'

// 查询返修管理-返修工单列表
export function listReturnrepair(query) {
  return request({
    url: '/rr/returnrepair/list',
    method: 'get',
    params: query
  })
}
// 查询返修管理-返修工单列表
export function lingList(query) {
  return request({
    url: '/rr/returnrepair/lingList',
    method: 'get',
    params: query
  })
}


// 查询返修管理-返修工单详细
export function getReturnrepair(id) {
  return request({
    url: '/rr/returnrepair/' + id,
    method: 'get'
  })
}

// 新增返修管理-返修工单
export function addReturnrepair(data) {
  return request({
    url: '/rr/returnrepair',
    method: 'post',
    data: data
  })
}

// 修改返修管理-返修工单
export function updateReturnrepair(data) {
  return request({
    url: '/rr/returnrepair',
    method: 'put',
    data: data
  })
}

// 修改返修管理-返修工单 单据头 单据头同时保存更新
export function editWorkAndLine(data) {
  return request({
    url: '/rr/returnrepair/editWorkAndLine',
    method: 'put',
    data: data
  })
}

// 删除返修管理-返修工单
export function delReturnrepair(id) {
  return request({
    url: '/rr/returnrepair/' + id,
    method: 'delete'
  })
}
// 完工 确定
export function finishWork(data) {
  return request({
    url: '/rr/returnrepair/finishWork',
    method: 'post',
    data: data
  })
}


